package com.example.goatstore;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;

public class PantallaCarga extends Activity {
	 
    private final int SPLASH_DISPLAY_LENGTH = 5000;
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        // Para mostrar a pantalla completa
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                                      WindowManager.LayoutParams.FLAG_FULLSCREEN);
 
        setContentView(R.layout.pantalla_carga);
 
        new Handler().postDelayed(new Runnable() {
           
            public void run() {
                Intent mainIntent = new Intent(PantallaCarga.this, LoginActivity.class);
                //mainIntent.putExtra(...,...);
                //...
                PantallaCarga.this.startActivity(mainIntent);
                PantallaCarga.this.finish();
            }
        }, SPLASH_DISPLAY_LENGTH);
    }
}
